Skip to content

fix: Use passthrough instead of strict for input schemas #223

Merged
margaretjgu merged 2 commits into
mainfrom
fix/passthrough-schemas
Apr 22, 2026
Merged

fix: Use passthrough instead of strict for input schemas #223
margaretjgu merged 2 commits into
mainfrom
fix/passthrough-schemas

Conversation

@margaretjgu
Copy link
Copy Markdown
Contributor

Summary

  • Replace .strict() with .passthrough() on all codegen'd z.object() input schemas in factory.ts
  • Unknown fields (plugin-specific, newer ES versions, undocumented params) now flow through to the server instead of being rejected client-side
  • Updated 4 tests from asserting rejection to asserting passthrough behavior

Fixes #170

@github-actions
Copy link
Copy Markdown

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 4.46s
✅ REPOSITORY gitleaks yes no no 60.94s
✅ REPOSITORY git_diff yes no no 0.09s
✅ REPOSITORY secretlint yes no no 2.63s
✅ REPOSITORY trivy yes no no 19.42s
✅ TYPESCRIPT eslint 2 0 0 5.41s

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@margaretjgu margaretjgu merged commit edd0609 into main Apr 22, 2026
17 checks passed
@margaretjgu margaretjgu deleted the fix/passthrough-schemas branch April 22, 2026 18:20
This was referenced Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: strict schema validation rejects unknown fields on all ES API commands

1 participant